/**
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.nhncorp.neptune.changelog;

import java.io.IOException;

import com.nhncorp.neptune.common.ipc.NVersionedProtocol;

interface ProxyInterface {
  public void setThisProxy(ProxyInterface proxyIF);
}

public interface ChangeLogServerIF extends NVersionedProtocol {
  static final long versionID = 1L;
  static final long REPORT_TIME = 30000;

  public String fini(String tabletName, int bytes);

  public String rollback(String tabletName, String position);

  public String removeAllLogs(String tabletName) throws IOException;

  public long getLogFileSize(String tabletName);

  public void closeAll(String tabletName);

  public void closePipe(String tabletName, String pipeKey);

  public int readLastLog(String tabletName);

  public int readAllLogs(String tabletName);

  public String backupLogFile(String tabletName);

  public void restoreLogFile(String tabletName);

  public void removeBackupLogs(String tabletName) throws IOException;

  public void format();

  public void stopChangeLogServer();

  public String tabletExists(String tabletName);

  public void start() throws IOException;
  
  public long getChecksum(String tabletName) throws IOException;
  
  public void test();
}
